package com.mobi.spring1.dao;

import com.mobi.spring1.pojo.Achievement;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;


public interface AchievementDao extends JpaRepository<Achievement,Integer> {
    @Transactional
    @Modifying
    @Query(nativeQuery=true,value = "delete FROM achievement where uid=:uid")
    void deleteAchievementsByUid(Integer uid);
}
